package com.heima.user.feign;

import com.heima.apis.userService.IUserServiceClinent;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import com.heima.model.user.dtos.CommentUserDto;
import com.heima.model.user.dtos.PagingDto;
import com.heima.user.service.ApUserRealnameService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @创建人: stone
 * @描述:
 */
@Slf4j
@RestController
@Api("用户审核控制器")
public class UserServiceClinent implements IUserServiceClinent {

    @Autowired
    private ApUserRealnameService userRealnameService;

    @Override
    @PostMapping("/api/v1/auth/list")
    public ResponseResult getUserRealnameList(@RequestBody ApUserRealnameDto dto) {
        return userRealnameService.getUserRealnameList(dto);
    }

    @Override
    @PostMapping("/api/v1/auth/authFail")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto) {
        return userRealnameService.authFail(dto);
    }

    @Override
    @PostMapping("/api/v1/auth/authPass")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto) {
        return userRealnameService.authPass(dto);
    }

    @Override
    @PostMapping("/api/v1/auth/user")
    public ResponseResult getUserRealnameUser(CommentUserDto dto) {
        return userRealnameService.getUser(dto);
    }

}
